08. Fast R-CNN

07 Fast RCNN V1 RENDER V2

RoI Pooling

To warp regions of interest into a consistent size for further analysis, some networks use RoI pooling. RoI pooling is an additional layer in our network that takes in a rectangular region of any size, performs a maxpooling operation on that region in pieces such that the output is a fixed shape. Below is an example of a region with some pixel values being broken up into pieces which pooling will be applied to; a section with the values:

[[0.85, 0.34, 0.76],
 [0.32, 0.74, 0.21]]

Will become a single max value after pooling: 0.85. After applying this to an image in these pieces, you can see how any rectangular region can be forced into a smaller, square representation.

An example of pooling sections, credit to [this informational resource](https://blog.deepsense.ai/region-of-interest-pooling-explained/) on RoI pooling [by Tomasz Grel].

An example of pooling sections, credit to this informational resource on RoI pooling [by Tomasz Grel].

You can see the complete process from input image to region to reduced, maxpooled region, below.

Credit to [this informational resource](https://blog.deepsense.ai/region-of-interest-pooling-explained/) on RoI pooling.

Credit to this informational resource on RoI pooling.

Speed

Fast R-CNN is about 10 times as fast to train as an R-CNN because it only creates convolutional layers once for a given image and then performs further analysis on the layer. Fast R-CNN also takes a shorter time to test on a new image! It’s test time is dominated by the time it takes to create region proposals.